Method and apparatus for performing tile-based path rendering

ABSTRACT

A method of rendering at least one of paths forming an object includes setting an initial value to each of tiles included in a frame based on a position and a proceeding direction of the at least one of paths, calculating a winding number of each of the tiles through which the at least one of paths passes, among the tiles included in the frame, based on the set initial value, and determining whether to perform shading based on the set initial value and the calculated winding number.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a divisional of, and claims priority under 35 U.S.C.§ 120 to, U.S. application Ser. No. 15/972,735, filed on May 7, 2018,which is a continuation of, and claims priority under 35 U.S.C. § 120to, U.S. application Ser. No. 14/823,554, filed Aug. 11, 2015, whichclaims the benefit of Korean Patent Applications Nos. 10-2014-0103626filed on Aug. 11, 2014, and 10-2015-0099232 filed on Jul. 13, 2015, inthe Korean Intellectual Property Office, the entire disclosures of eachof which are incorporated herein in by reference for all purposes.

BACKGROUND 1. Field

The present disclosure relates to a method and apparatus for performingtile-based path rendering.

2. Description of Related Art

Studies have recently been conducted on methods of improving theacceleration performance of a graphics processing unit (GPU) when vectorgraphics or path rendering is performed. The hardware structure of a GPUis designed on the assumption that all pieces of input data areconfigured as a triangle in order to accelerate three-dimensionalgraphics. However, for path rendering, input data is configured not astriangles but as a combination of a command and a vertex. Accordingly,it is difficult to improve the acceleration performance of a GPU whenperforming path rendering.

For example, in order to draw a curve by using a GPU, a controlprocessing unit (CPU) primarily divides the curve into a plurality oftriangles by using a start point of the curve as a center and instructsthe GPU to reconfigure the divided triangles as a curved line.Accordingly, a lot of time is consumed by a CPU when dividing the curveinto a plurality of triangles. Also, the CPU communicates with the GPUwhenever calling multiple OpenGL APIs and a lot of changes occur in thestate of the GPU.

In this connection, a stencil-based path rendering method using astencil buffer in the GPU has been suggested. However, according to thestencil-based path rendering method, data input to/output from memory isexcessively generated during rendering and thus the stencil buffer isincapable of parallel processing. Thus, the improvement in theacceleration performance of the GPU is limited.

SUMMARY

Provided is a method and apparatus for performing path rendering. Also,provided is a non-transitory computer readable storage medium havingstored thereon a program, which when executed by a computer, performsthe above method.

Additional aspects will be set forth in part in the description whichfollows and, in part, will be apparent from the description, or may belearned by practice of the presented embodiments.

According to an aspect of the present inventive concept, a method ofrendering an object including a path includes obtaining path dataincluding information about vertices included in the path and a commandcorresponding to the path, calculating a winding number of each of tilesincluded in a frame based on the path data, and determining whether toperform shading based on the winding number of the tile.

According to another aspect of the present inventive concept, a methodof calculating a winding number of a pixel includes receiving, from agraphics processing unit, information about at least one path andinformation about a first winding number set to each of tiles includedin a frame, calculating a winding number corresponding to each of thepixels included in the frame based on the received information, andoutputting the calculated winding number to the graphics processingunit.

According to another aspect of the present inventive concept, a methodof rendering an object includes dividing an image comprising a path intoa plurality of tiles, each of the tiles comprising a plurality ofpixels, and assigning, via different methods, a winding number to pixelsincluded in tiles where no path exists and pixels included in tileswhere a path exist, from among the plurality of tiles.

According to another aspect of the present inventive concept, there isprovided a non-transitory computer readable storage medium having storedthereon a program, which when executed by a computer, performs the abovemethod.

According to another aspect of the present inventive concept, anapparatus for rendering an object including a path includes an operationunit configured to obtain path data including information about verticesincluded in the path and a command corresponding to the path, and adetermination unit configured to determine whether to perform shadingbased on a winding number of a tile.

According to another aspect of the present inventive concept, anapparatus for generating a winding number of each of pixels included ina frame, the apparatus being connected to a graphics processing unitconfigured to render at least one path forming an object and beingconfigured to receive, from the graphics processing unit, informationabout the at least one path and information about a first winding numberset to each of tiles included in the frame, calculate a winding numbercorresponding to each of the pixels included in the frame based on thereceived information, and output the calculated winding number to thegraphics processing unit.

BRIEF DESCRIPTION OF THE DRAWINGS

These and/or other aspects will become apparent and more readilyappreciated from the following description of the embodiments, taken inconjunction with the accompanying drawings in which:

FIG. 1 is a block diagram illustrating an example of a renderingapparatus according to an embodiment;

FIG. 2 is a flowchart of an example of a method of performing pathrendering according to an embodiment;

FIG. 3 illustrates a winding number according to an embodiment;

FIG. 4 illustrates an example in which an operation unit calculates awinding number of a tile, according to an embodiment;

FIG. 5 illustrates an example of paths used by the operation unit to seta first winding number, according to an embodiment;

FIGS. 6A and 6B are views for explaining an example in which theoperation unit selects tiles, through which a first path passes, fromtiles included in a frame, according to an embodiment;

FIGS. 7A to 7E illustrate an example in which the operation unit selectstiles, through which a path passes, from among tiles included in aframe, according to an embodiment;

FIG. 8 is a view for explaining an example in which the operation unitobtains a first initial value of each of tiles, according to anembodiment;

FIGS. 9A to 9C illustrate an example of a rule of assigning a firstinitial value with respect to one path by the operation unit, accordingto an embodiment;

FIGS. 10A and 10B are views for explaining an example in which theoperation unit selects tiles, through which a second path passes, fromamong tiles included in a frame, and obtains a second initial value ofeach of tiles, according to an embodiment;

FIGS. 11A to 11C illustrate an example of a rule of assigning an initialvalue considering proceeding directions of two or more paths, which isperformed by the operation unit, according to an embodiment;

FIG. 12 is a view for explaining an example in which the operation unitsets an initial value of a tile when there are three paths, according toan embodiment;

FIGS. 13A and 13B are views for explaining an example in which theoperation unit selects tiles through which a third path passes fromamong tiles included in a frame and obtains a third initial value ofeach of tiles, according to an embodiment;

FIG. 14 illustrates examples of paths used by the operation unit to seta first winding number, according to an embodiment;

FIG. 15 illustrates examples in which the operation unit sets a firstwinding number, according to an embodiment;

FIGS. 16A to 16C are views for explaining an example in which theoperation unit calculates a second winding number of each of tiles,through which a path passes, according to an embodiment;

FIGS. 17A to 17C are views for explaining an example in which thedetermination unit determines whether to perform shading based on awinding number of each of the pixels included in a frame, according toan embodiment;

FIG. 18 is a block diagram illustrating a structure of a renderingapparatus according to another embodiment;

FIGS. 19A and 19B are view for explaining an example in which a dividingunit operates according to an embodiment;

FIG. 20 is a graph showing an example of a non-monotonic curve includedin path data according to an embodiment;

FIGS. 21A and 21B are views for explaining an example in which theoperation unit updates an initial winding value of each of predeterminedtiles to a first initial value by using a first monotonic curve of FIG.20, according to an embodiment;

FIGS. 22A and 22B are views for explaining an example in which theoperation unit updates a first initial value of each of predeterminedtiles to a second initial value by using a second monotonic curve ofFIG. 20, according to an embodiment;

FIGS. 23A and 23B are views for explaining an example in which theoperation unit updates a second initial value of each of predeterminedtiles to a third initial value by using a path from Vertex P₂ to VertexP₀ illustrated in FIG. 20, according to an embodiment;

FIGS. 24A and 24B are views for explaining an example in which thedividing unit converts a circular path to a cubic curve according to anembodiment;

FIG. 25 is a block diagram illustrating a structure of a renderingapparatus according to another embodiment;

FIG. 26 is a block diagram for explaining an example of a winding numbergenerator according to an embodiment;

FIGS. 27A and 27B are views for explaining an example in which a pathrendering method is embodied in a graphics processing unit (GPU);

FIG. 28 is a flowchart for explaining an example of an operation of avertex shader according to an embodiment;

FIG. 29 is a flowchart for explaining an example in which the vertexshader performs tile binning according to an embodiment;

FIG. 30 is a flowchart for explaining an example in which the vertexshader calculates a winding number of each of pixels and determineswhether to perform shaking of a pixel, according to an embodiment; and

FIG. 31 is a flowchart for explaining an example of a method ofcalculating a winding number of a pixel according to an embodiment.

DETAILED DESCRIPTION

Reference will now be made in detail to embodiments, examples of whichare illustrated in the accompanying drawings.

FIG. 1 is a block diagram illustrating an example of a renderingapparatus 100 according to an embodiment.

Referring to FIG. 1, the rendering apparatus 100 may include anoperation unit 110 and a determination unit 120. In FIG. 1, onlyconstituent elements related to the rendering apparatus 100 forperforming path rendering according to the present embodiment areillustrated. Accordingly, other general constituent elements may beincluded in the rendering apparatus 100 for performing path rendering inaddition to the constituent elements illustrated in FIG. 1.

Also, the operation unit 110 and the determination unit 120 of therendering apparatus 100 illustrated in FIG. 1 may correspond to one or aplurality of processors. A processor may be embodied by an array of aplurality of logic gates or by a combination of a general microprocessorand a memory storing a program that may be executed by themicroprocessor. Also, it will be understood by those of ordinary skillin the art that the processor may be embodied in a different form ofhardware.

The operation unit 110 obtains path data including information aboutvertices included in a path and a command corresponding to the path. Theoperation unit 110 determines a winding number of each of tiles includedin a frame based on the path data.

For example, the operation unit 110 may receive path data from anexternal apparatus of the rendering apparatus 100 and set a firstwinding number to each of the tiles based on information about theposition and proceeding direction of a path included in the path data.The external apparatus may be a memory or a central processing unit(CPU) outside the rendering apparatus 100. The operation unit 110 maydetermines a second winding number of each of tiles through which thepath passes from among the tiles included in a frame based on the firstwinding number.

The determination unit 120 determines whether to perform shading basedon the winding number of a tile.

The rendering apparatus 100 determines a winding number in units oftiles and determines whether to perform shading based on the determinedwinding number. In detail, the operation unit 110 determines the firstwinding number to be a winding number for the tiles through which thepath does not pass among the tiles included in a frame and the secondwinding number to be a winding number for the tiles through which thepath passes. Accordingly, as the winding number is precisely calculatedonly for the tiles through which the path passes from among the tilesincluded in a frame, the performance of the rendering apparatus 100 maybe improved.

An example of the operation of the rendering apparatus 100 is describedbelow in detail with reference to FIG. 2.

FIG. 2 is a flowchart for explaining an example of a method ofperforming path rendering according to an embodiment.

Referring to FIG. 2, the method of performing path rendering includesoperations that are time-serially processed by the rendering apparatus100 of FIG. 1.

In an operation 210, the operation unit 110 obtains path data includinginformation about vertices included in a path and a commandcorresponding to the path.

The path may be an element constituting a target, for example, anobject, to be rendered by the rendering apparatus 100. For example, thepath may be a straight line or a curved line connecting from one pointto another point. The object may include a closed polygon or a closedpath formed by connecting at least one path. The rendering apparatus 100may perform rendering by dividing an image or a part of an image intocontinuous small tiles. For example, the rendering apparatus 100 mayperform rendering by dividing an entire screen or a part of a screen ofa frame displaying a moving image or a still image into continuous smalltiles. For example, one tile may include pixels of 32×32, but thepresent embodiment is not limited thereto.

The path data includes information about coordinates of each of aplurality of vertexes included in a path and commands for forming a pathby combining the vertexes. The vertexes include a vertex correspondingto a start position of a path and a vertex corresponding to an endposition of the path.

For example, assuming that a straight line from a first pixel to asecond pixel among the pixels included in a frame (not shown) is definedto be a path, the vertexes signify points corresponding to the first andsecond pixels. Accordingly, the path data includes coordinates of afirst vertex corresponding to the first pixel, coordinates of a secondvertex corresponding to the second pixel, and a command for forming astraight line from the first vertex to the second vertex. Accordingly,in addition to the information about the coordinates of each of thevertexes forming the path, information about the position and proceedingdirection of the path may also be obtained by referring to the pathdata. Also, the path data may include information about a color valueset to each pixel.

In an operation 220, the operation unit 110 determines a winding numberof each of the tiles included in a frame based on the path data.

The operation unit 110 sets the first winding number with respect toeach of the tiles based on information about the position and proceedingdirection of a path included in the path data. The operation unit 110determines a second winding number of each of tiles through which thepath passes among the tiles included in a frame based on the firstwinding number.

The winding number of a tile is a winding number of each of pixelsincluded in the tile. All pixels of a tile may have the same windingnumber or different winding numbers according to the passing of a paththrough the tile.

The winding number may be a predetermined value indicating the number ofrotations made during rendering of a path, with respect to one side of aparticular pixel.

The winding number may be determined by increasing the predeterminedvalue when the path forms a complete circle clockwise and decreasing thepredetermined value when the path forms a complete circlecounterclockwise. In another embodiment the winding number may bedetermined in the opposite way to the above, i.e., by decreasing thepredetermined value when the path forms a complete circle clockwise andincreasing the predetermined value when the path forms a complete circlecounterclockwise. Still, in another embodiment, the winding number maybe determined by decreasing the predetermined value when the path formsa complete circle clockwise and increasing the predetermined value whenthe path forms a complete circle counterclockwise.

In an example, when a path forms a complete circle clockwise, thewinding number of a pixel may be +1. Also, when the path forms acomplete circle counterclockwise, the winding number of a pixel may be−1.

In another example, when a path forms a complete circle clockwise, thewinding number of a pixel may be −1. Also, when the path forms acomplete circle counterclockwise, the winding number of a pixel may be+1.

Also, the predetermined value may be an integer, but the presentembodiment is not limited thereto. In other words, when one side isviewed from a position of a particular pixel, the winding number maycorrespond, without limitation, to any number that is mapped to thenumber of rotations rendered during rendering of a path.

In the following description for convenience of explanation, it isassumed that the winding number is +1 when a path forms a completecircle clockwise and the winding number is −1 when the path forms acomplete circle counterclockwise. The winding number is described indetail with reference to FIG. 3.

FIG. 3 is a view for explaining a winding number according to anembodiment.

FIG. 3 illustrates an example for explaining a winding numbercorresponding to a pixel P of pixels included in a frame 510. In FIG. 3,for convenience of explanation, the pixel P is illustrated as a shape ofa person. FIG. 3 illustrates, for convenience of explanation, a shape ofa person who sees the pixel P in one direction.

Referring to FIG. 3, a path 330 is illustrated around the pixel P andthe path 330 is illustrated to be a closed path.

When the imaginary half line 320 is rendered in the horizontaldirection, starting from the pixel P and toward the right side thereof,the imaginary half line 320 and the path 330 intersect at a total offour vertexes 331, 332, 333, and 334. Accordingly, the winding number ofthe pixel P may be determined based on the direction in which the path330 is rendered at each of the four vertexes 331, 332, 333, and 334.

In detail, the direction in which the path 330 is rendered at the firstvertex 331 is a counterclockwise direction, that is, from bottom to top.Accordingly, the winding number of the pixel P is primarily calculatedto be −1. The direction in which the path 330 is rendered at the secondvertex 332 is a clockwise direction, that is, from top to bottom, andthus the winding number of the pixel P is secondarily calculated to be 0(−1+1). The direction in which the path 330 is rendered at the thirdvertex 333 is the counterclockwise direction and thus the winding numberof the pixel P is thirdly calculated to be −1 (−1+1−1). The direction inwhich the path 330 is rendered at the fourth vertex 334 is thecounterclockwise direction and thus the winding number of the pixel P isfinally calculated to be −2 (−1+1−1−1).

According to the above description with reference to FIG. 3, althoughthe winding number of the pixel P is described to be calculatedconsidering the path located at the right side of the pixel P, thepresent embodiment is not limited thereto. In other words, the operationunit 110 may calculate the winding number of the pixel P considering thepath located at at least one of the left, right, upper, and lower sideswith respect to the position of the pixel P.

The operation unit 110 calculates the winding number of each pixelincluded in the tile without using the stencil buffer. In other words,the operation unit 110 may calculate in parallel the winding number ofeach of the tiles without rendering triangles including the object inthe stencil buffer. Accordingly, an increase in the number of the datainput/output and an increase in the rendering time occurring in therendering based on the stencil buffer may be prevented.

Also, the operation unit 110 may calculate the winding number by using aplurality of threads. A single thread may be used in calculating thewinding number of a single pixel. Since the threads may be parallelprocessed, the operation unit 110 may simultaneously operate the windingnumbers of the pixels by using the threads. Accordingly, the renderingapparatus 100 may perform path rendering at high speed.

Referring back to FIG. 2, the operation unit 110 calculates a windingnumber in detail only for the tiles through which a path passes. Inother words, the operation unit 110 sets a first winding number withrespect to all tiles included in the frame and calculates a secondwinding number based on the first winding number only with respect tothe tiles through which a path passes from among the tiles included inthe frame. Since the winding number of pixels included in the tilesthrough which a path does not pass is determined as the first windingnumber, all pixels included in the tiles through which a path does notpass have the same winding number.

Accordingly, the rendering apparatus 100 may perform path rendering athigh speed.

An example in which the operation unit 110 calculates the second windingnumber only for the tiles through which a path passes is described belowwith reference to FIG. 4.

FIG. 4 illustrates an example in which the operation unit 110 calculatesa winding number of a tile according to an embodiment.

FIG. 4 illustrates a frame 510 formed of a plurality of tiles and aplurality of paths e₀, e₁, e₂, e₃, and e₄ forming an object 520 having astar shape. Referring to FIG. 4, the paths e₀, e₁, e₂, e₃, and e₄forming the object 520 do not pass through a tile A. However, the pathse₀ and e₂ of the paths e₀, e₁, e₂, e₃, and e₄ forming the object 520pass through a tile B.

In a general calculation of a winding number, a winding number of eachpixel included in the frame 510 is calculated. For example, the windingnumber of a pixel P₁ may be calculated considering the positions andproceeding directions of all paths e₀ and e₁ existing in one side of thepixel P₁. Also, the winding number of a pixel P₂ included may becalculated considering the positions and proceeding directions of allpaths e₀, e₂, e₄, and e₁ existing in one side of the pixel P₂.

Assuming that the winding number is calculated based on the pathslocated at the right side of the pixels P₁ and P₂, although no pathpasses through the tile A, the winding number of the pixel P₁ iscalculated based on the paths e₀ and e₁ that do not pass through thetile A. Also, the winding number of the pixel P₂ is calculatedconsidering not only the paths e₀ and e₂ that pass through the tile Bbut also the paths e₄ and e₁ that do not pass through the tile B.Accordingly, in a general rendering apparatus, a large amount ofcalculations is performed to calculate the winding numbers of the pixelsP₁ and P₂ because even the paths that do not pass through the tiles Aand B are taken into consideration.

However, the rendering apparatus 100 may calculate the winding number ofa pixel without considering a path that does not pass through a tile. Indetail, the operation unit 110 sets a first winding number to each ofthe tiles included in the frame 510 based on the position and proceedingdirection of a path, and the operation unit 110 calculates a secondwinding number only of each of tiles through which a path passes fromamong the tile included in the frame 510. Accordingly, the renderingapparatus 100 may determine the winding numbers of all pixels withoutindependently calculating the winding numbers of pixels for a tilethrough which a path does not pass. Accordingly, the rendering apparatus100 may perform path rendering at high speed.

Referring back to FIG. 2, in an operation 230, the determination unit120 may determine whether to perform shading based on the winding numberof a tile. The shading may be performed by a fragment shader 2731.Accordingly, t the determination unit 120 may determine whether toinstruct the fragment shader 2731 to perform shading of a pixel. Theshading may be a process of setting a color to each of pixels, but thepresent embodiment is not limited thereto. For example, the shading maybe a process of setting brightness to each pixel or expressing textureof each pixel. Also, the fragment shader 2731 may perform shading of apixel based on the texture.

For example, the determination unit 120 may determine whether to performshading based on the first winding number set by the operation unit 110,with respect to the pixels included in a tile through which a path doesnot pass. Also, for the pixels included in a tile through which a pathpasses the determination unit 120 may determines whether to performshading based on the second winding number calculated by the operationunit 110. In doing so, the determination unit 120 may determine whetherto perform shading based on a preset rule.

Hereinafter, an example in which the operation unit 110 sets a firstwinding number to each of the tiles is described below with reference toFIGS. 5 to 15.

FIG. 5 illustrates an example of paths used by the operation unit 110 toset a first winding number according to an embodiment.

Referring to FIG. 5, a frame 510 includes tiles of 6×6 and an object 520having a triangular shape includes three paths e₀, e₁, and e₂. The pathe₀ is a straight path from Vertex P₀ to Vertex P₁. The path e₁ is astraight path from Vertex P₁ to Vertex P₂. The path e₂ is a straightpath from Vertex P₂ to Vertex P₀.

It is assumed that the operation of the operation unit 110 that will bedescribed with reference to FIGS. 6 to 13 is performed based on thepaths e₀, e₁, and e₂ of FIG. 5. In other words, it is assumed that thepath data received by the operation unit 110 includes information aboutthe position and proceeding direction of each of the paths e₀, e₁, ande₂.

In detail, it is assumed that the path data includes information aboutthe coordinates of each of the vertexes P₀, P₁, and P₂, and the commandsfor forming the paths e₀, e₁, and e₂ by combining the vertexes, forexample, a command to render a straight path from Vertex P₀ to VertexP₁, a command to render a straight path from Vertex P₁ to Vertex P₂, anda command to render a straight path from Vertex P₂ to Vertex P₀.

The operation unit 110 sets a first winding number to each of the tilesincluded in the frame. In detail, the operation unit 110 assigns aninitial winding number to each of the tiles included in the frame. Forexample, the initial winding number is 0. In other words, 0 may beassigned as a default value to each of the files included in the frame.

The operation unit 110 selects the tiles through which at least one ofpaths passes from among the tiles included in the frame. The operationunit 110 updates the initial winding number of each of the tiles locatedat one side of the selected tiles according to the shape of the pathpassing in each of the selected tiles. The one side of a tile denotesany one of the left, right, upper, and lower sides of a tile. In detail,an example in which the operation unit 110 selects the tiles throughwhich at least one of paths passes from among the tiles included in theframe and updates an initial winding number of each of the tiles locatedat one side of the selected tiles is described below in detail.

First, the operation unit 110 receives path data from an externalapparatus. The path data includes information about a total of the threepaths e₀, e₁, and e₂ of the object illustrated in FIG. 5. The operationunit 110 assigns the value 0 as an initial winding number to all tilesincluded in the frame and updates the assigned value for all of thetiles by sequentially considering a plurality of paths e₀, e₁, and e₂,thereby setting the first winding number.

In detail, the operation unit 110 obtains a first initial valueWN_(init_1) by adding or subtracting a predetermined value to or fromthe initial winding number, for example, 0, assigned to the tile basedon the position and proceeding direction of the first path e₀. In doingso, the initial winding numbers of some of the tiles included in theframe may be determined to be the first initial value WN_(init_1)without a change.

Then, the operation unit 110 obtains a second initial value WN_(init_2)by adding or subtracting a predetermined value to or from the firstinitial value WN_(init_1) based on the position and proceeding directionof the second path e₁. In doing so, the first initial values WN_(init_1)of some of the tiles included in the frame may be determined to be thesecond initial value WN_(init_2) without a change.

Then, the operation unit 110 obtains a third initial value WN_(init_3)by adding or subtracting a predetermined value to or from the secondinitial value WN_(init_2) based on the position and proceeding directionof the third path e₂. In doing so, the second initial values WN_(init_2)of some of the tiles included in the frame may be determined to be thethird initial value WN_(init_3) without a change.

Finally, the operation unit 110 determines the third initial valueWN_(init_3) to be the first winding number WN_(init).

In the following descriptions, an example in which the operation unit110 obtains the first initial value WN_(init_1) based on the positionand proceeding direction of the first path e₀ is described withreference to FIGS. 6A to 9C, and an example in which the operation unit110 obtains the second initial value WN_(init_2) based on the positionand proceeding direction of the second path e₁ is described withreference to FIGS. 10A to 11C. Also, an example in which the operationunit 110 obtains the third initial value WN_(init_3) based on theposition and proceeding direction of the third path e₂ is described withreference to FIGS. 12 and 13B, and finally an example of determining thethird initial value WN_(init_3) to be the first winding number WN_(init)is described.

FIGS. 6A and 6B illustrate an example in which the operation unit 110selects a tile through which the first path e₀ passes from among thetiles included in a frame according to the present embodiment.

FIG. 6A illustrates the first path e₀. The first path e₀ is a straightpath connected from Vertex P₀ to Vertex P₁. Assuming that the first pathe₀ is viewed from the left side thereof, it may be seen that the firstpath e₀ is a path that rotates counterclockwise.

FIG. 6B illustrates tiles 620, through which the first path e₀ passes,among the tiles included in a frame. The operation unit 110 selects thetiles 620, through which the first path e₀ passes, among the tilesincluded in the frame. The operation unit 110 generates information“Edge_List” indicating that the first path e₀ passes through the tile,for each of the selected tiles of the tiles 620, and stores theinformation in a local memory 150 of FIG. 25. For example, theinformation Edge_List may be stored in the form of a bitstream in thelocal memory 150 according to each tile. “e₀” indicated in each of thetiles 620 of FIG. 6B denotes information included in the informationEdge_List of each of the tiles 620, in other words, information that thefirst path e₀ passes through the tile.

An example in which the operation unit 110 selects the tiles 620 throughwhich the first path e₀ passes from among the tiles included in theframe is described below with reference to FIGS. 7A to 7E.

FIGS. 7A to 7E illustrate an example in which the operation unit 110according to the present embodiment selects the tiles through which apath passes from among the tiles included in a frame.

The operation unit 110 determines a point where a path and an outline ofone side of each of the tiles included in the frame meet. The outline ofone side of each of the tiles may be an outline of any one of the left,right, upper and lower sides of each of the tiles. Referring to FIG. 7A,the first path e₀ is connected from Vertex P₀ to Vertex P₁ and theoperation unit 110 determines a point 721 where the first path e₀ meetsa right outline 710 of each of the tiles.

The operation unit 110 virtually divides a path with respect to thepoint 721 that is determined. The virtual dividing of a path by theoperation unit 110 does not mean actual dividing of a path but may meana process of calculating intermediate points on the path for theoperation unit 110 to accurately select the tiles through which the pathpasses from among the tiles included in the frame.

Referring to FIG. 7B, the operation unit 110 virtually divides the firstpath e₀ into a first sub-path e₀₁ from Vertex P₁ where the first path e₀starts to the point 721 that is determined and a second sub-path e₀₂from the point 721 that is determined to Vertex P₁ where the first pathe₀ ends.

The operation unit 110 forms a rectangle having a divided path as adiagonal line. The operation unit 110 selects tiles including therectangle that is formed. Referring to FIG. 7B, the operation unit 110forms a rectangle having the first sub-path e₀, as a diagonal line. Theoperation unit 110 selects tiles 731 including the formed rectangle.

If the path e₀ and one side of the tiles included in the frame meet at aplurality of points, the operation unit 110 repeatedly performs theabove process described with reference to FIGS. 7A and 7B. Referring toFIG. 7C, the operation unit 110 determines a point 722 where the firstpath e₀ meets the right outline 710.

The operation unit 110 virtually divides the path with respect to thepoint 722 that is determined. Referring to FIG. 7D, the operation unit110 divides the second sub-path e₀₂ into a third sub-path e₀₃ from thepoint 721 to the point 722 that is determined and a fourth sub-path e₀₄from the point 722 that is determined to Vertex P₁ where the secondsub-path e₀₂ ends.

The operation unit 110 forms a rectangle having a divided path as adiagonal line. The operation unit 110 selects tiles including therectangle that is formed. Referring to FIG. 7D, the operation unit 110forms a rectangle having the third sub-path e₀₃ as a diagonal line. Theoperation unit 110 selects tiles 732 including the rectangle that isformed.

When there is no further point where the one side of the tiles includedin the frame and the path meet, the operation unit 110 forms a rectanglehaving the remaining sub-path divided from the first path e₀ as adiagonal line and selects tiles included in the rectangle. Referring toFIG. 7E, the operation unit 110 forms a rectangle having the fourthsub-path e₀₄ as a diagonal line. The operation unit 110 selects tiles733 including the formed rectangle.

Finally, the operation unit 110 may determine the tiles 731, 732, and733, through which the first path e₀ passes, among the tiles included inthe frame, by combining the selected tiles 731, 732, and 733.

As described above with reference to FIGS. 7A to 7E, the operation unit110 may accurately select the tiles 731, 732, and 733 through which thefirst path e₀ passes from among the tiles included in the frame bydividing the path into at least one of sub-paths and selecting the tilesincluding a rectangle having the sub-path as a diagonal line.

When the tiles 731, 732, and 733, through which the first path e₀ passesare selected, the operation unit 110 obtains the first initial valueWN_(init_1) by updating the initial winding number of each of the tileslocated at one side of each of the tiles 731, 732, and 733 that areselected, according to a shape of the first path e₀ passing through eachof the tiles 731, 732, and 733 that are selected. The one side signifiesany one of the left, right, upper, and lower sides of a tile. An examplein which the operation unit 110 obtains the first initial valueWN_(init_1) of each of the tiles is described below with reference toFIGS. 8 to 9C.

FIG. 8 illustrates an example in which the operation unit 110 obtainsthe first initial value of each of predetermined tiles according to thepresent embodiment.

For convenience of explanation, FIG. 8 illustrates tiles located on oneside of selected tiles 810 to be tiles 921, 822, and 823 located at theleft side of the selected tiles 810. However, the present embodiment isnot limited thereto. In other words, the first initial value WN_(init_1)of the tiles located at any one of the right, upper, and lower sides ofthe tiles 710 through which the first path e₀ passes may be obtained.The selected tiles 810 are the tiles 731, 732, and 733, through whichthe first path e₀ passes, as described above with reference to FIGS. 7Ato 7E.

Also, although it is not illustrated in FIG. 8, the initial windingnumber is assigned to all tiles included in a frame. For example, 0 maybe assigned as a default value to all tiles included in a frame.

Referring to FIG. 8, the operation unit 110 obtains the first initialvalue WN_(init_1) for the tiles 921 from among the tiles 921, 822, and823 located at the left side of the selected tiles 810. In other words,the operation unit 110 delays calculation of the first initial valueWN_(init_1) with respect to the tile 923 located at the left side of thetile including Vertex P₀ where the first path e₀ starts and the tiles922 located at the left side of the tile including Vertex P₁ where thefirst path e₀ ends.

As described above with reference to FIG. 5, Vertex P₀ is a point wherethe first path e₀ and the third path e₂ meet, and Vertex P₁ is a pointwhere the first path e₀ and the second path e₁ meet. In other words, theoperation unit 110 delays calculation of the first initial valueWN_(init_1) with respect to the tiles 922 and 923 located at the leftside of the tile having Vertex P₀ and Vertex P₁ where two or more pathsmeet. The operation unit 110 obtains the second initial valueWN_(init_2) with respect to the tiles 922 and 923, considering a shapeof two or more paths passing through the tiles, which is described laterwith reference to FIG. 11.

The operation unit 110 may obtain the first initial value WN_(init_1) byadding or subtracting a predetermined value to or from the initialwinding number assigned to the tiles 921 in accordance with a presetrule. In an example, the operation unit 110 may obtain the first initialvalue WN_(init_1) of the tiles 921 by adding a predetermined value tothe initial winding number when the first path e₀ passes through twoopposite boundaries of the tiles 810 clockwise and subtracting apredetermined value from the initial winding number when the first pathe₀ passes through the two opposite boundaries of the tiles 810counterclockwise. In another example, the operation unit 110 may obtainthe first initial value WN_(init_1) of the tiles 921 by subtracting apredetermined value from the initial winding number when the first pathe₀ passes through the two opposite boundaries of the tiles 810 clockwiseand adding a predetermined value to the initial winding number when thefirst path e₀ passes counterclockwise through the two oppositeboundaries of the tiles 810. The predetermined value may be 1, but thepresent embodiment is not limited thereto. In other words, thepredetermine value may correspond, without limitation, to any value thatis predetermined according to the proceeding direction of a path.

An example of a rule of obtaining the first initial value WN_(init_1) byusing the operation unit 110 is described with reference to FIGS. 9A to9C.

FIGS. 9A to 9C illustrate an example of a rule of assigning the firstinitial value WN_(init_1) by the operation unit 110.

FIG. 9A illustrates a case in which a path 911 passes through twoopposite boundaries of a tile 921 clockwise, that is, from top tobottom. FIG. 9B illustrates a case in which a path 912 passes throughtwo opposite boundaries of a tile 922 counterclockwise, that is, frombottom to top. FIG. 9C illustrates a case in which a path 913 enters andexits through one boundary of a tile 923.

The tiles 921, 922, and 923 illustrated in FIGS. 9A to 9C may be tilesobtained by combining two or more tiles. For example, when two or moretiles through which a path passes are continuously provided in ahorizontal direction, the two or more tiles may be considered as one ofthe tiles 921, 922, and 923 respectively illustrated in FIGS. 9A to 9C.Referring to FIG. 8, the first path e₀ passes through two neighboringtiles 811 and 812 in the second and fifth rows of a frame. In this case,the two neighboring tiles 811 and 812 through which the first path e₀passes may be considered as one of the tiles 921, 922, and 923respectively illustrated in FIGS. 9A to 9C.

Referring to FIG. 9A, when the path 911 passes clockwise through the twoopposite boundaries of the tile 921, that is, from top to bottom, theoperation unit 110 obtains the first initial value WN_(init_1) by adding1 to the initial winding number of all tiles 931 located at the leftside of the tile 921.

Referring to FIG. 9B, when the path 912 passes counterclockwise throughthe two opposite boundaries of the tile 922, that is, from bottom totop, the operation unit 110 obtains the first initial value WN_(init_1)by subtracting 1 from the initial winding number of all tiles 932located at the left side of the tile 922.

Referring to FIG. 9C, when the path 913 enters and exits the tile 923 bypassing through one boundary of the tile 923, the operation unit 110obtains the first initial value WN_(init_1) by adding 0 to the initialwinding number of all tiles 933 located at the left side of the tile 923or by considering the initial winding number as it is.

Although in FIGS. 9A to 9C, the operation unit 110 adds 1 to the initialwinding number when the path passes through the tile clockwise andsubtracts 1 from the initial winding number when the path passes throughthe tile counterclockwise, the present embodiment is not limitedthereto. In an example, when the path passes through the tile clockwise,the operation unit 110 may subtract 1 from the initial winding number,and when the path passes through the tile counterclockwise, theoperation unit 110 may add 1 to the initial winding number.

Referring back to FIG. 8, since the first path e₀ is a straight pathconnected from Vertex P₀ to Vertex P₁, the first path e₀ passes throughthe two opposite boundaries of the tiles 810 counterclockwise.Accordingly, the operation unit 110 obtains the first initial valueWN_(init_1) by subtracting 1 from the initial winding number of each ofthe tiles 821. Among the tiles included in a frame, the initial windingnumber of each of the tiles except for the tiles 821 may be determinedto be the first initial value WN_(init) without a change. The operationunit 110 may store the first initial value WN_(init_1) in the localmemory 150 according to each tile.

As described above with reference to FIG. 5, when the path data includesinformation about a plurality of paths, the operation unit 110 sets theinitial value of the tile by sequentially considering the paths. Asdescribed above with reference to FIGS. 8 to 9C, since the operationunit 110 obtains the first initial value WN_(init_1) based on theposition and proceeding direction of the first path e₀, the operationunit 110 obtains the second initial value WN_(init_2) by updating thefirst initial value WN_(init_1) based on the position and proceedingdirection of the second path e₁.

An example in which the operation unit 110 selects tiles through whichthe second path e₁ passes from among the tiles included in a frame 910and obtains the second initial value WN_(init_2) of each of the tiles isdescribed below with reference to FIGS. 10A to 11C.

FIGS. 10A and 10B illustrate an example in which the operation unit 110according to the present embodiment selects tiles through which thesecond path e₁ passes from among the tiles included in a frame andobtains the second initial value WN_(init_2) of the tiles.

FIG. 10A illustrates the second path e₁. The second path e₁ is astraight path from Vertex P₁ to Vertex P₂. Accordingly, it may be seenthat the second path e₁ is a clockwise path.

The operation unit 110 selects tiles 1020 through which the second pathe₁ passes from among the tiles included in a frame. A method used by theoperation unit 110 to select the tiles 1020 is the same as the methoddescribed above with reference to FIGS. 7A to 7E. The operation unit 110generates for each of the selected tiles of the tiles 1020 information“Edge_List” indicating that the second path e₁ passes through the tileand stores the information in the local memory 150. For a tile for whichthe information Edge_List is already generated as described above withreference to FIG. 6, information that the second path e₁ passes throughthe tile is additionally stored in the previously generated informationEdge_List. “E₀, e₁” or “e₁” marked on the tiles 1020 of FIG. 10B denoteinformation included in the information Edge_List of each of the tiles1020. In other words, the tile marked with “e₀” and “e₁” is a tilethrough which both of the first path e₀ and the second path e₁ pass.Also, the tile marked with “e₁” is a tile through which the second pathe₁ passes.

The operation unit 110 assigns the second initial value WN_(init_2) toeach of tiles 1031 located at one side of the tiles 1020 that areselected. A method used by the operation unit 110 to obtain the secondinitial value WN_(init_2) of each of the tiles 1231 is the same as themethod described above with reference to FIGS. 8 to 9C. In other words,since the second path e₁ passes through the tiles 1020 clockwise, theoperation unit 110 obtains the second initial value WN_(init_2) byadding 1 to the first initial value WN_(init_1) of each of the tiles1031. For the tiles 1033 located at the left side of the tile includingthe vertex P₁ where the second path e₁ starts, the operation unit 110obtains the second initial value WN_(init_2) in consideration of theshapes of the first path e₀ and the second path e₁ passing through thetiles. An example in which the operation unit 110 obtains the secondinitial value WN_(init_2) of each of the tiles 1033 is described belowwith reference to FIGS. 11A to 12. Among the tiles included in theframe, the first initial value WN_(init_1) of each of the tiles exceptfor the tiles 1031 is determined to be the second initial valueWN_(init_2) without a change. The operation unit 110 may store thesecond initial value WN_(init_2) in the local memory 150 according toeach tile.

Also, as described above with reference to FIG. 8, the operation unit110 delays the calculation of the second initial value WN_(init_2) tothe tiles 1032 located at the left side of the tile including Vertex P₂where the second path e₁ ends. The operation unit 110 obtains the thirdinitial value WN_(init_3) of each of the tiles 1032, considering theshapes of the second path e₁ and the third path e₂ passing through thetiles.

FIGS. 11A to 11C illustrate an example of a rule of assigning an initialvalue considering the proceeding directions of two or more paths by theoperation unit 110 according to an embodiment.

FIG. 11A illustrates a case in which two or more paths 1111 passclockwise through two boundaries facing each other of a tile 1121, thatis, from top to bottom. FIG. 11B illustrates a case in which two or morepaths counterclockwise 1112 pass through two boundaries facing eachother of a tile 1122, that is, from bottom to top. FIG. 11C illustratesa case in which two or more paths 1113 enter and exit through oneboundary of a tile 1123.

For example, referring to FIGS. 8 to 10, a case in which both of avertex where the first path e₀ ends and a vertex where the second pathe₁ starts are Vertex P₁ corresponds to FIG. 11C.

The tiles 1121, 1122, and 1123 illustrated in FIGS. 11A to 11C may betiles obtained by combining two or more tiles. For example, when two ormore tiles, through which a path passes, are continuously provided in ahorizontal directly, the two or more tiles may be considered to be oneof the tiles 1121, 1122, and 1123 respectively illustrated in FIGS. 11Ato 11C.

An example of tiles through which three paths pass is described belowwith reference to FIG. 12.

FIG. 12 illustrates an example in which the operation unit 110 sets aninitial value of a tile through which three paths pass, according to anembodiment.

Referring to FIG. 12, a frame 1210 formed of tiles of 8×8 and an object1220 having a star shape are illustrated. The object 1220 includes fivepaths e₀, e₁, e₂, e₃, e₄, and e₅. The path e₂ and the path e₃ enter sometiles 1230 included in a frame and pass therethrough in a horizontaldirection. Since the path e₂ and the path e₃ do not pass throughboundaries facing each other of the tiles 1230 or enter and exit throughone boundary, the paths do not fall under the rule of FIGS. 11A to 11C.Accordingly, the initial value WN_(init) of each of the tiles 1240located at one side, for example, the left side, of the tiles 1230 maynot be set to be delayed.

When one path included in the object 1220 enters the tiles 1230, theoperation unit 110 delays setting of the initial value WN_(init) of eachof the tiles located at one side of the tiles 1230 until another pathincluded in the object 1220 exits from the tiles 1230. For example, whenthe path e₂ enters the tiles 1230, even if the next path e₃ passesthrough some of the tiles 1230 included in the frame in a horizontaldirection, the operation unit 110 delays the setting of the initialvalue WN_(init) of each of the tiles located at one side of the tiles1230. Then, when the path e₄ exits from the tiles 1230, the operationunit 110 sets the initial value WN_(init) of each of the tiles locatedat one side of the tiles 1230.

In other words, the operation unit 110 sets the initial value WN_(init)of each of the tiles located at one side of the tiles 1230 according tothe shape of three paths of the paths e₂, e₃, and e₄ passing through thetiles 1230. The operation unit 110 may set the initial value WN_(init)of each of the tiles according to the rule illustrated in FIGS. 11A to11C.

Referring to FIG. 11A, when two or more paths 1111 pass through theboundaries facing each other of the tile 1121 clockwise (from top tobottom), the operation unit 110 adds 1 to the initial value or theinitial winding number of all tiles 1131 located at the left of the tile1121.

Referring to FIG. 11B, when two or more paths 1112 pass counterclockwisethrough the boundaries facing each other of the tile 1122 (from bottomto top), the operation unit 110 subtracts 1 from the initial value orthe initial winding number of all tiles 1132 located at the left of thetile 1122.

Referring to FIG. 11C, when two or more paths 1113 enter and exit oneboundary of the tile 1123 clockwise, the operation unit 110 adds 0 tothe initial value or the initial winding number of all tiles 1133located at the left of the tile 1123 or maintains the initial value orthe initial winding number without a change.

Although in FIGS. 11A to 11C, the operation unit 110 adds 1 to theinitial value or the initial winding number when the paths pass throughthe tile clockwise and subtracts 1 from the initial value or the initialwinding number when the paths pass through the tile counterclockwise,the present embodiment is not limited thereto. In an example, when thepath passes through the tile clockwise, the operation unit 110 maysubtract 1 from the initial value or the initial winding number, andwhen the path passes through the tile counterclockwise, the operationunit 110 may add 1 to the initial value or the initial winding number.

Referring back to FIGS. 8 and 10A, since the path obtained by connectingthe first path e₀ and the second path e₁ enters from a lower side of thetile including Vertex P₁ and exits the tile through the lower side.Accordingly, the operation unit 110 maintains the second initial valueWN_(init_2) of each of the tiles 1033 to be 0 that is the same as thefirst initial value WN_(init_1).

FIG. 10B illustrates the second initial value WN_(init_2) obtained basedon the first path e₀ and the second path e₁. Values “0”, “−1”, or “1”indicated at the tiles 1041, 1042, and 1043 of FIG. 10B denote thesecond initial values WN_(init_2) of the tiles 1041, 1042, and 1043.Also, although not illustrated in FIG. 10B, the second initial valueWN_(init_2) of each of the tiles, except for the tiles 1041, 1042, and1043, among the tiles included in the frame is 0 that is the same as theinitial winding number.

As described above with reference to FIGS. 10A to 11C, since theoperation unit 110 obtains the second initial value WN_(init_2) based onthe position and proceeding direction of the second path e₁, theoperation unit 110 sets the third initial value WN_(init_3) by updatingthe second initial value WN_(init_2) based on the position andproceeding direction of the third path e₂.

An example in which the operation unit 110 selects tiles through whichthe third path e₂ passes from among the tiles included in a frame 1110and obtains the third initial value WN_(init_3) to the tiles located atone side of the selected tiles is described below with reference toFIGS. 13A and 13B.

FIGS. 13A and 13B illustrate an example in which the operation unit 110selects tiles through which the third path e₂ passes among the tilesincluded in the frame and obtains the third initial value WN_(init_3) ofeach of the tiles, according to the present embodiment.

FIG. 13A illustrates the third path e₂. The third path e₂ is a straightpath connected from Vertex P₂ to Vertex P₀. Accordingly, it may be seenthat the third path e₂ is a path that rotates clockwise.

The operation unit 110 selects tiles 1320 through which the second pathe₁ passes from among the tiles included in the frame. A method in whichthe operation unit 110 selects the tiles 1320 is the same as the methoddescribed above with reference to FIG. 7. The operation unit 110generates for each of the selected tiles of the tiles 1320 information“Edge_List” indicating that the third path e₂ passes through the tileand stores the information in the local memory 150. For a tile for whichthe information Edge_List is already generated as described above withreference to FIG. 6, information that the third path e₂ passes isadditionally stored in the previously generated information Edge_List.“E₀, e₂”, “e₁, e₂”, or “e₂” marked on the tiles of FIG. 13B denoteinformation included in the information Edge_List of each of the tiles.In other words, the tile marked with “e₀” and “e₂” is a tile throughwhich both of the first path e₀ and the third path e₂ pass. Also, thetile marked with “e₁” and “e₂” is a tile through which both of thesecond path e₁ and the third path e₂ pass. Also, the tile marked with“e₂” is a tile through which the third path e₂ passes.

The operation unit 110 obtains the third initial value WN_(init_3) byupdating the second initial value WN_(init_2) of each of tiles 1331located at one side of the tiles 1320 that are selected. For example,the operation unit 110 may obtain the third initial value WN_(init_3) ofeach of tiles 1331 at the left side of the tiles 1320 that are selected.A method in which the operation unit 110 obtains the third initial valueWN_(init_3) of each of the tiles 1331 is the same as the methoddescribed above with reference to FIGS. 8 and 9A to 9C. In detail, sincethe third path e₂ passes through the tiles 1320 clockwise, the operationunit 110 obtains the third initial value WN_(init_3) by adding 1 to thesecond initial value WN_(init_2) of each of the tiles 1331 located atthe left side according to the rule of FIG. 9A.

For tiles 1332 located at the left side of the tile including Vertex P₂where the third path e₂ starts, the operation unit 110 determines thethird initial value WN_(init_3) considering the shapes of the secondpath e₁ and the third path e₂ passing through the tiles. An example inwhich the operation unit 110 determines the third initial valueWN_(init_3) of each of the tiles 1332 is the same as the methoddescribed above with reference to FIGS. 11A to 11C. In detail, since thesecond path e₁ and the third path e₂ pass clockwise two boundariesfacing each other of the tiles 1321 (from top to bottom), the secondpath e₁ and the third path e₂ correspond to the case of FIG. 11A.Accordingly, the operation unit 110 obtains the third initial valueWN_(init_3) by adding 1 to the second initial value WN_(init_2) of eachof the tiles 1332.

Also, for the tile 1333 locates at the left side of the tile includingVertex P₀ where the third path e₂ ends, the operation unit 110determines the third initial value WN_(init_3) considering the shapes ofthe third path e₂ and the first path e₀ passing through the tiles. Indetail, since the third path e₂ and the first path e₀ enter and exit thetile 1122 in the same direction through one side (upper side) of thetile 1322, that is, the upper surface, of the tile 1122, the third pathe₂ and the first path e₀ correspond to the case of FIG. 11C.Accordingly, the operation unit 110 determines the second initial valueWN_(init_2) of the tiles 1333 to be the third initial value WN_(init_3)without a change.

For the tiles except for the tiles 1331, 1332, and 1333 from among thetiles included in the frame, the second initial value WN_(init_2) isdetermined to be the third initial value WN_(init_3) without a change.The operation unit 110 may store the third initial value WN_(init_3) inthe local memory 150 for each tile.

FIG. 13B illustrates the third initial value WN_(init_3) obtained basedon the first path e₀, the second path e₁, and the third path e₂. Value“0” or “1” indicated at the tiles 1341, 1342, 1343, and 1344 illustratedin FIG. 13B denote the third initial value WN_(init_3) of each of thetiles 1341, 1342, 1343, and 1344. Also, although not illustrated in FIG.13B, the third initial value WN_(init_3) of the tiles except for thetiles 1341, 1342, 1343, and 1344 among the tiles included in the frameis 0 that is the same as the initial winding number.

The operation unit 110 determines the third initial value WN_(init_3) tobe the first winding number WN_(init). As described above with referenceto FIGS. 6A to 13B, the operation unit 110 determines the third initialvalue WN_(init_3) that is obtained by updating the initial windingnumber, for example, 0, to be the first winding number WN_(init).

According to the descriptions with reference to FIGS. 5 to 13B, theoperation unit 110 sets the first winding number WN_(init) with respectto all tiles included in the frame in consideration of the same side.For example, the operation unit 110 may set first winding numberWN_(init) by adding or subtracting a predetermined value to or from theinitial number of each of the tiles existing at the left side of a tileaccording to a direction in which a path passes through the tile.

When an object is deviated to one side of a frame, the operation unit110 may set the first winding number WN_(init) considering differentsides for the respective tiles included in the frame. In other words,the operation unit 110 may set the first winding number WN_(init)considering the position of each of the tiles included in the frame andthe position of a path in the frame, which is described below in detailwith reference to FIGS. 14 and 15.

FIG. 14 illustrates examples of paths used by the operation unit 110 toset a first winding number, according to an embodiment.

Referring to FIG. 14, a frame 1410 includes tiles of 6×6, and an object1420 having a triangular shape includes three paths e₀, e₁, and e₂. Theobject 1420 is deviated to the right side of the frame 1410.

FIG. 15 illustrates examples in which the operation unit 110 sets thefirst winding number, according to an embodiment.

FIG. 15 illustrates examples in which the operation unit 110 processesthe paths of FIG. 14. Referring to FIG. 15, the paths e₀, e₁, and e₂ aresequentially drawn in the frame. In this regard, an object formed by thepaths e₀, e₁, and e₂ is deviated to the right side of the frame.

The operation unit 110 may set the first winding number WN_(init)considering the position of each of the tiles included in the frame andthe position of a path in the frame. In detail, it is checked whetherthe object is deviated to one side of the frame by using informationabout the paths e₀, e₁, and e₂ included in the path data. When theobject is deviated to one side of the frame, the operation unit 110divides the frame into a first area 1511 in which the object is notincluded and a second area 1512 in which the object is included. Theoperation unit 110 sets the first winding number WN_(init) by changing adirection for checking a path for each of areas 1511 and 1512. AlthoughFIG. 15 illustrates that the operation unit 110 is divided into twoareas 1511 and 1512, the number of areas by which the operation unit 110divides the frame is not limited to two.

First, the operation unit 110 assigns an initial winding number to alltiles included in the frame. For example, the operation unit 110 mayassign the initial winding number of each of all tiles included in aframe 1510 to 0. Next, the operation unit 110 may use different sides inobtaining the first winding number WN_(init) of each of the tiles in thefirst area 1511 and the second area 1512. In an embodiment, the firstwinding number WN_(init) for the tiles of the first area 1511 facing theleft side may be obtained contrary to the descriptions with respect toFIGS. 3 to 13. In this case, since no path exists in the first area1511, the operation unit 110 does not add or subtract a predeterminednumber, for example, 1, to the initial winding number with respect toany tile included in the first area 1511. In other words, the operationunit 110 sets the first winding number WN_(init) of each of the tilesincluded in the first area 1511 to the initial winding number, forexample, 0.

For the tiles of the second area 1512, contrary to the tiles of thefirst area 1511, the first winding number WN_(init) facing the rightside may be obtained. Thus, the descriptions presented with reference toFIGS. 3 to 13 may be identically applied to the present example. Indetail, since no tile exists at the left side of the tiles 1520 throughwhich the path e₀ passes, the first winding number WN_(init) is the sameas the initial winding number.

For a tile 1550 included in the second area 1512 where the path e₁exists at the left side of a tile 1530, obtaining a second initialnumber WN_(init_2) is delayed until the path e₂ is considered as avertex. Thus, the second initial number WN_(init_2) of each of the tilesof the second area 1512 is the same as the first winding numberWN_(init).

The tile 1550 is the only one included in the second 1512 and exists atthe left side of the tiles 1540 through which the path e₂ passes. Inthis case, a third initial number WN_(init_3) is obtained according tothe rule of FIG. 11A. In other words, the operation unit 110 obtains thethird initial number WN_(init_3) of the tile 1550 by adding +1 to thesecond initial number WN_(init_2).

Finally, the operation unit 110 determines the third initial numberWN_(init_3) to be the first winding number WN_(init) for each of thetiles in the second area 1512.

To summarize the above description, an entire image or a partial imageis divided into tiles and a first winding number of each of all pixelsincluded in each tile is determined. For a tile through which no pathpasses, the first winding number that is determined as such is used as afinal winding number for each of the pixels. For a tile through which apath passes, a final winding number of each of the pixels is determinedby a method described below. In detail, for pixels of a tile throughwhich a path passes, the second initial number WN_(init_2) is calculatedbased on the first winding number WN_(init) and the second windingnumber WN is determined to be the final winding number. In calculatingthe second winding number WN, the position and proceeding direction of apath existing in each tile and the position of a pixel are considered.

An example in which the operation unit 110 calculates the second windingnumber WN of each of the tiles through which a path passes is describedwith reference to FIGS. 16A to 16C.

FIGS. 16A to 16C illustrate an example in which the operation unit 110calculates the second winding number of each of the tiles, through whicha path passes, according to an embodiment.

FIG. 16A illustrates a frame formed of 6×6 tiles and an object 1620having a triangular shape that is the same as the object 520 illustratedin FIG. 5. Accordingly, as described above with reference to FIGS. 6A to13B, FIGS. 16A to 16C illustrate a result of the operation unit 110selecting tiles 1630, through which the paths e₀, e₁, and e₂ pass, andsetting the first winding number WN_(init) to each of the tiles includedin the frame.

A single tile includes a plurality of pixels. Accordingly, the windingnumbers of the pixels set by the operation unit 110 may be differentfrom each other in a single tile. In particular, for tiles 1630 throughwhich the paths e₀, e₁, and e₂ pass the winding numbers of pixelsincluded in the tiles 1630 may be different from each other.Accordingly, for the pixels of each of the tiles 1630 including a path,the operation unit 110 calculates the second winding number WN based onthe first winding number WN_(init). The winding number of each of allpixels included in the tiles that do not include a path, except for thetiles 1630, is determined to be the first winding number WN_(init) ofthe tile. An example of calculating the second winding number WN isdescribed below in detail with reference to FIGS. 16B and 16C.

FIG. 16B illustrates a tile 1631 of the tiles 1630 of FIG. 16A, throughwhich the paths e₀, e₁, and e₂ pass. The internal area of the tile 1631may be divided into two areas by the first path e₀ and the second pathe₁. In the following description, an area surrounded by the first pathe₀ and the second path e₁ may be referred to as a first area 1641 and anarea other than the first area 1641 may be referred to as a second area1642.

The operation unit 110 calculates the second winding number WN based onthe first winding number WN_(init) of a tile 1631. In detail, theoperation unit 110 may calculate the second winding number WN of thetile 1631 by using the Edge_List of the tile 1631 stored in the localmemory 150. The Edge_List of the tile 1631 includes information aboutthe paths e₀ and e₁ that pass through the tile 1631. Thus, the operationunit 110 may calculate the second winding number WN based on thepositions and the proceeding directions of the paths e₀ and e₁ that passthrough the tile 1631.

For example, the operation unit 110 may calculate the second windingnumber WN of the tile 1631, that is, the winding number WN of a pixelincluded in the tile 1631, according to Equation 1.

WN=WN _(init)(N _(CW) −N _(CCW))  [Equation 1]

In Equation 1, “WN” denotes the first winding number of a pixel and“WN_(init)” denotes an initial value of a tile including pixels.“N_(CW)” denotes a value determined based on a path located at one sideof a pixel and proceeding clockwise, that is, from top to bottom.“N_(CCW)” denotes a value determined based on a path located at one sideof a pixel and proceeding counterclockwise, that is, from bottom to top.The one side of a pixel denotes any one of the left, right, upper, andlower sides with respect to the position of the pixel and the samedirection as the direction used for calculating the first windingnumber. For example, if the first winding number is calculated by usingthe right direction in FIGS. 6 to 13B, the same right direction is usedfor calculating the winding number WN of a pixel

The operation unit 110 may calculate the winding number WN of a pixel1651 included in the first area 1641 to be +1. In detail, the firstwinding number WN_(init) of the tile 1631 is 0, and Now is 1 because thesecond path e₁ located at the right side of the pixel 1651 proceedsclockwise. Also, since no path proceeding counterclockwise exists at theright side of the pixel 1651, N_(CCW) of the pixel 1651 is 0.Accordingly, the operation unit 110 may calculate the winding number WNof the pixel 1651 to be +1 according to Equation 1.

Also, the operation unit 110 may calculate the winding number WN of apixel 1652 included in the second area 1642 to be 0. In detail, sincethe first winding number WN_(init) of the tile 1631 is 0 and the firstpath e₀ located at the right side of the pixel 1652 proceedscounterclockwise, N_(CCW) of the pixel 1652 is 1. Accordingly, theoperation unit 110 may calculate the winding number WN of the pixel 1652to be 0 according to Equation 1.

Also, the operation unit 110 may calculate the winding number WN of thepixel 1653 included in the second area 1642 to be 0. In detail, sincethe first winding number WN_(init) of the tile 1631 is 0 and no path islocated at the right side of the pixel 1653, N_(CW) and N_(CCW) are 0.Accordingly, the operation unit 110 may calculate the winding number WNof the pixel 1653 to be 0 according to Equation 1.

In summary, the winding number WN of each of the pixels included in thefirst area 1641 of FIG. 16B may be all calculated to be 1, and thewinding number WN of each of the pixels included in the second area 1642may be all calculated to be 0. Accordingly, the winding numbers WN ofthe pixels, although the pixels are included in the same tile 1631, maybe different from each other according to an area divided by the path.

FIG. 16C illustrates another tile 1632 of the tiles 1630 of FIG. 16A,through which the paths e₀, e₁, and e₂ pass. The internal area of thetile 1632 may be divided into two areas by the first path e₀. In thefollowing description, When an area surrounded by the first path e₀ andthe lower and right boundary lines of the tile 1632 is a third area1643, the winding number of a pixel 1654 of the third area 1643 is 0. Indetail, the first winding number of the tile 1632 is 1 and no pathexists at the right side of the pixel 1654, and thus, N_(CW) and N_(CCW)are 0. Thus, the operation unit 110 may calculate the winding number WNof the pixel 1654 to be 1 according to Equation 1.

Also, when an area other than the third area 1643 in the tile 1632 is afourth area 1644, the winding number of each of the pixels 1655 and 1656of the fourth area 1644 is 1. In detail, since the first path e₀ islocated at the right side of the pixel 1655, N_(CW) is 0 and N_(CCW) is1.

Accordingly, the operation unit 110 may calculate the winding number WNof the pixel 1655 to be 0 according to Equation 1. For a case of thepixel 1656, like the pixel 1655, N_(CW) is 0 and N_(CCW) is 1. TheEdge_List of the tile 1632 include information about the position andthe proceeding direction of the path e₀ that passes through the tile1632. Although FIG. 16C illustrates that no path exists at the rightside of the pixel 1656 in the tile 1632, the operation unit 110calculates the winding number of a pixel by using the Edge_List and thusthe operation unit 110 regards that the first path e₀ exists at theright side of the pixel 1656. Thus, since N_(CW) and N_(CCW) of thepixel 1656 are 0 and 1, respectively, the operation unit 110 maycalculate the winding number WN of the pixel 1655 to be 0 according toEquation 1.

In conclusion, the winding number WN of each of the pixels included inthe third area 1643 of FIG. 16C may be all calculated to be 1, and thewinding number WN of each of the pixels included in the fourth area 1644may be all calculated to be 0.

As described above, unlike the tiles including no path, the windingnumber of each of pixels included in each of the tiles including a pathis determined based on the position of a pixel in the tile and theposition and the proceeding direction of a path that passes through thetile.

As described above with reference to FIGS. 1 and 2, the determinationunit 120 may determine whether to perform shading based on the windingnumber of a tile. In other words, the determination unit 120 maydetermine whether to give a command to perform shading of a pixel to thefragment shader 2731 based on the first winding number WN_(init) and thesecond winding number WN.

As described above with reference to FIGS. 5 to 16C, the operation unit110 sets the first winding number to each of the tiles included in theframe and calculates the second winding number of each of the tilesthrough which at least one path passes based on the first windingnumber. As a result, the same result as the operation unit 110calculates the winding numbers with respect to all pixels included inthe frame is obtained. Accordingly, the determination unit 120 maydetermine whether to perform shading based on the winding number of eachof the pixels included in the frame. The shading may signify setting acolor to each of the pixels, but the present embodiment is not limitedthereto.

For example, the determination unit 120 determines whether to set acolor to each of the pixels by using the winding number of each of thepixels included in the frame. For example, the determination unit 120may determine whether to set a color to each of the pixels according toa preset rule. The preset rule may be any one of a first rule in which acolor value is assigned to pixels having winding numbers that are not 0and a second rule in which a color value is assigned to pixels havingwinding numbers that are odd numbers. An example in which thedetermination unit 120 determines whether to perform shading isdescribed with reference to FIGS. 17A to 17C.

FIGS. 17A to 17C illustrate an example in which the determination unit120 determines whether to perform shading based on the winding number ofeach of the pixels included in the frame according to an embodiment.

FIG. 17A illustrates a winding number for each of pixels included in aframe 1710. FIG. 17B illustrates a result of the assignment of colorvalues to the pixels according to a first rule. Also, FIG. 17Cillustrates a result of the assignment of color values to the pixelsaccording to a second rule.

Referring to FIG. 17A, the winding numbers of the pixels included in anarea 1711 are calculated to be 0, the winding numbers of the pixelsincluded in an area 1712 are calculated to be +1, and the windingnumbers of the pixels included in an area 1713 are calculated to be +2.

In an example, the determination unit 120 may determine whether to set acolor to each of the pixels according to the first rule. The first rulespecifies that a color value is assigned to pixels having windingnumbers that are not 0. Referring to FIG. 17B, according to the firstrule, the determination unit 120 determines that a color is set to thepixels included in the area 1712 and the area 1713 and a color is notset to the pixels included in the area 1711.

In another example, the determination unit 120 may determine whether toset a color to each of the pixels according to the second rule. Thesecond rule specifies that a color value is assigned to pixels havingwinding numbers that are odd numbers. In the present example, the oddnumber means that the absolute value of the winding number of the pixelis an odd number. For example, when a winding number is +3, the windingnumber is determined to be an odd number. Also, when a winding number is−3, the winding number is determined to be an odd number. When a windingnumber is 0, the winding number is determined to be an even number.Referring to FIG. 17C, according to the second rule, the determinationunit 120 determines that a color is set to the pixels included in thearea 1712 of FIG. 17A and a color is not set to the pixels included inthe area 1711 and the area 1713.

The determination unit 120 transmits, to the fragment shader 2731,information about the pixels that are determined to set a color. Thefragment shader 2731 assigns a color value to pixels that are determinedby the determination unit 120 to set a color.

According to the above description, since the apparatus 100 calculatesthe second winding number only for the tiles, through which the pathpasses, among the pixels included in the frame, the calculation speed ofthe rendering apparatus 100 may be improved.

Also, the rendering apparatus 100 may operate the winding number of eachpixel without using the stencil buffer. Accordingly, the problems ofexcessive generation of data input to/output from memory due to use ofthe stencil buffer and generation of redundant data input to/output frommemory due to use of the stencil buffer may be solved.

Also, since the rendering apparatus 100 generates the winding number inparallel with respect to each of the pixels included in the frame, pathrendering may be performed at high speed and thus high resolutionrendering may be achieved over a short period of time.

FIG. 18 is a block diagram illustrating a structure of the renderingapparatus 100 according to another embodiment.

Referring to FIG. 18, the rendering apparatus 100 further includes adividing unit 130 in addition to the operation unit 110 and thedetermination unit 120.

An example of the operations of the operation unit 110 and thedetermination unit 120 is as described above with reference to FIGS. 1to 17. Accordingly, a detailed description thereof is omitted in thefollowing description.

When a path is a non-monotonic curve, the dividing unit 130 divides thenon-monotonic curve into a plurality of monotonic curves. For example,the dividing unit 130 may divide a monotonic curve into monotonic curvesbased on the de Casteljau's algorithm. When the path data includesinformation about a non-monotonic curve, the dividing unit 130 changesinformation about a non-monotonic curve to information about monotoniccurves. The dividing unit 130 transmits the information about monotoniccurves to the operation unit 110. The operation unit 110 selects a tile,through which the monotonic curves pass, among the tiles included in theframe, and sets the first winding number WN_(init) of each of the tilesincluded in the frame.

An example in which the dividing unit 130 divides a non-monotonic curveinto a plurality of monotonic curves is described below with referenceto FIGS. 19A and 19B.

FIGS. 19A and 19B illustrate an example in which the dividing unit 130operates according to an embodiment.

FIG. 19A illustrates a non-monotonic curve 1910. The path describedabove with reference to FIGS. 4 to 17C has a positive inclination valueor a negative inclination value. If it is assumed that the pathdescribed with reference to FIGS. 4 to 17C exists on a two-dimensionalcoordinate plane, as an x-coordinate component of a path increases, ay-coordinate component of the path always increases or always decreases.However, in the non-monotonic curve 1910 of FIG. 19A, when thex-coordinate component of the non-monotonic curve 1910 increases, they-coordinate component of the non-monotonic curve 1910 may not alwaysincrease or not always decrease. Accordingly, when the path dataincludes the information about the non-monotonic curve 1910, theoperation unit 110 may not accurately calculate the first winding numberWN_(init) or the second winding number WN of each of the tiles includedin the frame.

FIG. 19B illustrates two monotonic curves 1911 and 1912. The monotoniccurves 1911 and 1912 illustrated in FIG. 19B are curves obtained bydividing the non-monotonic curve 1910 illustrated in FIG. 19A. Assumingthat the monotonic curves 1911 and 1912 exist on a two-dimensionalcoordinate plane, when the x-coordinate component of the monotonic curve1911 increases, the y-coordinate component of the monotonic curve 1911always increases.

Also, when the x-coordinate component of the monotonic curve 1912increases, the y-coordinate component of the monotonic curve 1912 alwaysdecreases. In other words, in the monotonic curve 1911 or 1912, when thex-coordinate component increases, the y-coordinate component alwaysincreases or always decreases. Accordingly, when the path data includesthe information about the monotonic curve 1911 or 1912, the operationunit 110 may accurately calculate the first winding number WN_(init) orthe second winding number WN of each of the tiles included in the frame.

When the path data includes the information about the non-monotoniccurve 1910, the dividing unit 130 divides the non-monotonic curve 1910into two or more monotonic curves 1911 and 1912. In other words, thedividing unit 130 converts the information about the non-monotonic curve1910 included in the path data to information about the two or moremonotonic curves 1911 and 1912. Accordingly, even when the path dataincludes the information about the non-monotonic curve 1910, theoperation unit 110 and the determination unit 120 may perform the aboveoperation described with reference to FIGS. 4 to 17C.

For example, the dividing unit 130 may divide the non-monotonic curve1910 into the monotonic curves 1911 and 1912 based on the de Casteljau'salgorithm. The de Casteljau's algorithm signifies an algorithm used todivide one Bezier curve into two or more Bezier curves. Since the deCasteljau's algorithm is well known to those skilled in the art, adetailed description thereof is omitted.

An example in which the rendering apparatus 100 operates when the pathdata includes information about a non-monotonic curve is described belowwith reference to FIGS. 20 to 23B.

FIG. 20 illustrates an example of a non-monotonic curve included in thepath data according to an embodiment.

Referring to FIG. 20, a frame 2010 includes 6×6 tiles and anon-monotonic curve 2020 includes three vertexes P₀, P_(ex), and P₂. Thenon-monotonic curve 2020 is assumed to be a curve that passes VertexP_(ex) from Vertex P₀ as a start vertex to Vertex P₂ as an end vertex.The dividing unit 130 divides the non-monotonic curve 2020 into aplurality of monotonic curves. For example, the dividing unit 130 maydivide the non-monotonic curve 2020 into a first monotonic curve 2031from Vertex P₀ to Vertex P_(ex) and a second monotonic curve 2032 fromVertex P_(ex) to Vertex P₂. Vertex P_(ex) denotes a point whereinclination of the non-monotonic curve 2020 changes from positive (+) tonegative (−).

The dividing unit 130 may select a vertex where the inclination of thenon-monotonic curve is changed from positive (+) to negative (−) or viceversa among the vertexes included in the non-monotonic curve and dividethe non-monotonic curve with respect to the selected vertex.Accordingly, the non-monotonic curve may be divided into two or moremonotonic curves.

On the other hand, the path data may include information about Vertex P₀that is a start point of the non-monotonic curve 2020 and Vertex P₂ thatis an end point of the non-monotonic curve 2020, and a command to rendera curve from Vertex P₀ to Vertex P₂. However, even when the path datadoes not clearly include a command to render a path 2040, for example, astraight line, from Vertex P₂ to Vertex P₀, the path 2040 from Vertex P₂to Vertex P₀ may be automatically added. Accordingly, when the path datainclude the information indicating the non-monotonic curve 2020, anobject including the non-monotonic curve 2020 and the path 2040 fromVertex P₂ to Vertex P₀ may be rendered in the frame 2010.

Accordingly, the operation unit 110 may set the first winding numberWN_(init) to each of the tiles included in the frame 2010 according tothe method described above with reference to FIGS. 6A to 13. Theoperation unit 110 may calculate the second winding number WN of each ofthe tiles through which at least one of the first and second monotoniccurves 2031 and 2032 and the path 2040 passes according to the methoddescribed with reference to FIGS. 16A to 16C. The determination unit 120may determine whether to perform shading with respect to each of thepixels included in the frame according to the above-described methodwith reference to FIGS. 17A to 17C.

An example in which the operation unit 110 sets a first winding numberWN_(init) to each of the tiles included in the frame by using the pathsillustrated in FIG. 20, that is, the first monotonic curve 2031, thesecond monotonic curve 2032, and the path 2040 from Vertex P₂ to VertexP₀ is described below with reference to FIGS. 21A to 23B. In detail, inFIGS. 21A and 21B, the operation unit 110 updates the initial windingnumber of each of predetermined tiles to the first initial valueWN_(init_1) by using the first monotonic curve 2031. In FIGS. 22A and22B, the operation unit 110 updates the first initial value WN_(init_1)of each of predetermined tiles to the second initial value WN_(init_2)by using the second monotonic curve 2032. In FIGS. 23A and 23B, theoperation unit 110 updates the second initial value WN_(init_2) of eachof predetermined tiles to the third initial value WN_(init_3) by usingthe path 3040 from Vertex P₂ to Vertex P₀.

The operation unit 110 sets the third initial value WN_(init_3) of thetiles included in the frame 2010 to be the first winding numberWN_(init) of all tiles included in the frame 2010. As described abovewith reference to FIG. 5, the initial winding number, for example, 0, isassigned to all tiles included in the frame 2010.

FIGS. 21A and 21B illustrate an example in which the operation unit 110updates the initial value of each of predetermined tiles to the firstinitial value by using the first monotonic curve 2031 illustrated inFIG. 20 according to an embodiment.

FIG. 21A illustrates a first monotonic curve 2031. The first monotoniccurve 2031 is a curved path connected from Vertex P₀ to Vertex P_(ex).Accordingly, the first monotonic curve 2031 may be a path proceedingcounterclockwise.

The operation unit 110 selects tiles 2130, through which the firstmonotonic curve 2031 passes, among the tiles included in a frame. Amethod in which the operation unit 110 selects the tiles 2130 is thesame as the method described above with reference to FIGS. 7A to 7E. Theoperation unit 110 generates information “Edge_List” indicating that thefirst monotonic curve 2031 passes through the tile, for each of theselected tiles of the tiles 2130, and stores the information in thelocal memory 150. “C₀” marked on the tiles 2130 of FIG. 21B denotesinformation included in the information Edge_List of each of the tiles2130. In other words, the tile marked with “C₀” is a tile, through whichthe first monotonic curve 2031 passes.

The operation unit 110 updates the initial winding number of each oftiles 2141 located at one side of the selected tiles 2130 to the firstinitial value WN_(init_1). For example, the operation unit 110 mayupdate the initial winding number of each of the tiles 2141 at the leftside of the selected tiles 2130 to the first initial value WN_(init_1).A method in which the operation unit 110 updates the initial windingnumber of each of the tiles 2141 to the first initial value WN_(init_1)is the same as the method described above with reference to FIGS. 9A and9C. In other words, since the first monotonic curve 2031 passes throughthe tiles 2130 counterclockwise, the operation unit 110 obtains thefirst initial value WN_(init_1) by subtracting 1 from the initialwinding number of each of the tiles 2141. The updating of the firstinitial value WN_(init_1) of each of the tiles 2142 and 2143 located atthe left side of Vertex P₀ and Vertex P₂ is delayed as described above.Accordingly, the initial winding number of each of the tiles included inthe frame, except for the tiles 2141, is determined to be the firstinitial value WN_(init_1). The operation unit 110 may store the firstinitial value WN_(init_1) in the local memory 150 according to each ofthe tiles.

FIGS. 22A and 22B illustrate an example in which the operation unit 110updates the first initial value of each of predetermined tiles to thesecond initial value by using the second monotonic curve 2032 of FIG. 20according to an embodiment.

FIG. 22A illustrates a second monotonic curve 2032. The second monotoniccurve 2032 is a curved path connected from Vertex P_(ex) to Vertex P₂.Accordingly, the second monotonic curve 2032 may be a path proceedingclockwise.

The operation unit 110 selects tiles 2230 through which the secondmonotonic curve 2032 passes from among the tiles included in a frame2210. A method used by the operation unit 110 to select the tiles 2230is the same as the method described above with reference to FIGS. 7A to7E. The operation unit 110 generates information “Edge_List” indicatingthat the second monotonic curve 2032 passes through the tile, for eachof the selected tiles of the tiles 2230, and stores the information inthe local memory 150. As described above with reference to FIG. 21A, forthe tile in which the information “Edge_List” is already generated,information indicating that the second monotonic curve 2032 passes isadditionally stored in the previously generated information “Edge_List”.The tile marked with “C₀” and “C₁” in FIG. 22B is a tile, through whichboth of the first monotonic curve 2031 and the second monotonic curve2032 pass. Also, the tile marked with “C₀” is a tile, through which thefirst monotonic curve 2031 passes. The tile marked with “C₁” is a tile,through which the second monotonic curve 2032 passes.

The operation unit 110 updates the first initial value WN_(init_1) ofeach of tiles 2240 located at one side of the selected tiles 2230 to thesecond initial value WN_(init_2). However, the second monotonic curve2032 passes through the tiles 2230 horizontally. Accordingly, asdescribed above with reference to FIG. 12, the operation unit 110 delaysthe setting of the second initial value WN_(init_2) to the tiles 2240and assigns the third initial value WN_(init_3) to each of the tiles2240 according to a shape of a single path obtained by connecting thesecond monotonic curve 2032 and the path from Vertex P₂ to Vertex P₀passing through the tiles 2230.

FIGS. 23A and 23B illustrate an example in which the operation unit 110updates the second initial value of each of predetermined tiles to thethird initial value by using a path 2040 from Vertex P₂ to Vertex P₀illustrated in FIG. 20 according to an embodiment.

FIG. 23A illustrates the path 2040 from Vertex P₂ to Vertex P₀. The path2040 from Vertex P₂ to Vertex P₀ is a path proceeding clockwise.

The operation unit 110 selects tiles 2330 through which the path 2040passes from among the tiles included in a frame 2310. A method used bythe operation unit 110 to select the tiles 2330 is the same as themethod described above with reference to FIGS. 7A to 7E. The operationunit 110 generates information “Edge_List” indicating that the path 2040passes through the tile, for each of the selected tiles 2330, and storesthe information in the local memory 150. As described above withreference to FIG. 22A, for the tile in which the information “Edge_List”is already generated, information indicating that the path 2040 passesis additionally stored in the previously generated information“Edge_List”. The tile marked with “C₀” and “e₂” in FIG. 23B is a tile,through which both of the first monotonic curve 2031 and the path 2040pass. Also, the tile marked with “C₀” is a tile, through which the firstmonotonic curve 2031 passes. The tile marked with “C₁” and “e₂” is atile through which both of the second monotonic curve 2032 and the path2040 pass. The tile marked with “C₀”, “C₁”, and “e₂” is a tile throughwhich all of the first monotonic curve 2031, the second monotonic curve2032, and the path 2040 pass.

The operation unit 110 updates the second initial value WN_(init_2) ofeach of tiles 2341 located at one side of the selected tiles 2330 to thethird initial value WN_(init_3). For example, the operation unit 110 mayupdate the second initial value WN_(init_2) of each of the tiles 2341located at the left side of the selected tiles 2330 to the third initialvalue WN_(init_3). A method in which the operation unit 110 updates thethird initial value WN_(init_3) to each of the tiles 2341 is the same asthe method described above with reference to FIGS. 13A and 13B. In otherwords, since the path 2040 passes through the tiles 2330 clockwise, theoperation unit 110 obtains the third initial value WN_(init_3) by adding1 to the second initial value WN_(init_2) of each of the tiles 2341.

On the other hand, for tiles 2342 located at the left side of the tileincluding Vertex P₂ where the path 2040 starts, the operation unit 110assigns the third initial value WN_(init_3), considering a shape of thesecond monotonic curve 2032 and the path 2040 passing through the tile.A method used by the operation unit 110 to update the third initialvalue WN_(init_3) to each of the tiles 2342 is the same as the methoddescribed above with reference to FIGS. 11A to 11C. In detail, referringto FIGS. 21A, 22A, and 23A, since the first monotonic curve 2031, thesecond monotonic curve 2032, and the path 2040 enters and exits throughone boundary of a tile obtained by combining the tile 2331 and the tile2333, the operation unit 110 determines the third initial valueWN_(init_3) by maintaining the initial winding number of each of thetiles 2342. The operation unit 110 may store the third initial valueWN_(init_3) in the local memory 150 according to each tile.

Also, for tiles 2343 located at the left side of a tile including VertexP₀ where the path 2040 ends, the operation unit 110 updates the thirdinitial value WN_(init_3), considering a shape of the path 2040 and thefirst monotonic curve 2031 passing through the tile. A method in whichthe operation unit 110 assigns the third initial value WN_(init_3) tothe tiles 2343 is the method described above with reference to FIGS. 11Ato 11C. In detail, since a single path obtained by combining the path2040 and the first monotonic curve 2031 enters and exits the tiles 2343through one boundary of the tiles 2343, the operation unit 110 assigns 0as the third initial value WN_(init_3) to each of the tiles 2343. Theoperation unit 110 may store the third initial value WN_(init_3) of thetiles 2343 in the local memory 150.

The second initial value WN_(init_2) of each of the tiles included inthe frame, except for the tiles 2341, 2342, and 2343, is determined tobe the third initial value WN_(init_3). The operation unit 110 may storethe third initial value WN_(init_3) for each tile in the local memory150.

FIG. 23B illustrates the third initial value WN_(init_3).

“0” or “1” marked on each of the tiles 2351 and 2352 illustrated in FIG.23B denotes the third initial value WN_(init_3) of each of the tiles2351 and 2352. Also, although not illustrated in FIG. 23B, the thirdinitial value WN_(init_3) of the tiles included in the frame, except forthe tiles 2351 and 2352, is 0, which is the same as the initial windingnumber.

The operation unit 110 determines the third initial value WN_(init_3) tobe the first winding number WN_(init). As described above with referenceto FIGS. 21A and 23B, the operation unit 110 determines the thirdinitial value WN_(init_3) obtained by updating the initial windingnumber, for example, 0, to be the first winding number WN_(init).

As described above with reference to FIGS. 19A to 23B, the operationunit 110 may set the first winding numbers of all tiles even when thepath data includes information about a non-monotonic curve. Also, asdescribed above with reference to FIG. 16, the winding numbercorresponding to each of pixels of a tile through which a path passesmay be calculated by using the first winding number. The determinationunit 120 may determine whether to perform shading with respect to eachof the pixels included in the frame by using the calculated windingnumber of pixels. Accordingly, the rendering apparatus 100 mayaccurately perform path rendering even in the case of a non-monotoniccurve.

FIGS. 24A and 24B illustrate an example in which the dividing unit 130converts a circular path to a cubic curve according to an embodiment.

FIG. 24A illustrates an oval path 2410. FIG. 24B illustrates a cubiccurve or a cubic Bezier curve 2420. When the path data received by therendering apparatus 100 includes information about the oval path 2410,the dividing unit 130 may converts the oval path 2410 to the cubicBezier curve 2420. The dividing unit 130 may divide the cubic Beziercurve 2420 to a plurality of monotonic curves. Accordingly, therendering apparatus 100 may accurately perform path rendering even inthe case of the oval path 2410.

Although in the above description the oval path 2410 is described as anexample for convenience of explanation, the dividing unit 130 mayconvert a circular path to a cubic curve.

FIG. 25 is a block diagram illustrating a structure of the renderingapparatus 100 according to another embodiment.

Referring to FIG. 25, the rendering apparatus 100 further includes ageneration unit 140 and the local memory 150 in addition to theoperation unit 110 and the determination unit 120.

An example of the operations of the operation unit 110 and thedetermination unit 120 is as described above with reference to FIGS. 1to 17. Accordingly, a detailed description thereof is omitted in thefollowing description. Also, the further inclusion of the dividing unit130 in the rendering apparatus 100 of FIG. 25 is the same as thatdescribed above with reference to FIGS. 18 to 24B.

As described above with reference to FIGS. 1 to 24B, the winding numberof a pixel is calculated by the operation unit 110. However, accordingto the rendering apparatus 100 of FIG. 25, the winding number of a pixelis calculated by the generation unit 140, the calculated winding numberis transmitted to the determination unit 120. In detail, when thedetermination unit 120 requests the generation unit 140 to calculate thewinding number of a first pixel, the generation unit 140 reads outinformation about the first winding number WN_(init) of a first tileincluding the first pixel and at least one of paths passing through thefirst tile, that is, information about the position and proceedingdirection of the path, from the local memory 150. The generation unit140 calculates the winding number WN of the first pixel by using theread information. A method used by the generation unit 140 to calculatethe winding number WN of the first pixel is the same as the methoddescribed above with reference to FIGS. 16A to 16C.

The generation unit 140 transmits the winding number WN of the firstpixel to the determination unit 120. The determination unit 120determines whether to perform shading based on the winding number WN ofa pixel transmitted from the generation unit 140 and the first windingnumber WN_(init) of a tile transmitted from the operation unit 110.

FIG. 26 illustrates an example of a winding number generation accordingto an embodiment apparatus.

Referring to FIG. 26, the rendering apparatus 100 includes the operationunit 110, the local memory 150, and the determination unit 120. Awinding number generator 2600 is located outside the rendering apparatus100.

An example of the operations of the operation unit 110, the local memory150, and the determination unit 120 included in the rendering apparatus100 is the same as that described above with reference to FIGS. 1 to 25.Accordingly, a detailed description thereof is omitted in the followingdescription. Also, the further inclusion of the dividing unit 130 in therendering apparatus 100 of FIG. 26 is the same as described above withreference to FIGS. 18 to 25.

The winding number generator 2600 is an independent apparatus separatefrom the rendering apparatus 100. An example of the operation of thewinding number generator 2600 is the same as that of the generation unit140 of FIG. 25.

FIGS. 27A and 27B illustrate examples in which a path rendering methodis embodied in a GPU 2700 according to an embodiment.

Referring to FIG. 27A, a path rendering method executed in the GPU 2700includes operations that are time serially processed in the renderingapparatus 100 of FIGS. 1, 18, and 25. Accordingly, it may be seen thatthe descriptions on the rendering apparatus 100 illustrated in FIGS. 1,18, and 25, though they are omitted in the following description, isapplied to the following description described with reference to FIG.27A.

Referring to FIG. 27A, the GPU 2700 includes a global memory 2710, avertex shader 2720, a pixel shader 2730, and a frame buffer 2740. Thevertex shader 2720 performs the same function as that of the renderingapparatus 100 illustrated in FIGS. 1, 18, and 25.

Referring to FIG. 27B, a winding number generator 2750 is illustrated asan independent apparatus separated from a GPU 2701. In other words, thewinding number generator 2750 may be included inside the GPU 2700 or maybe independently located outside the GPU 2701.

The pixel shader 2730 illustrated in FIGS. 27A and 27B performs shadingon each of the pixels included in the frame. First, the pixel shader2730 or the fragment shader 2731 included in the pixel shader 2730 setsa color value to each of the pixels. The fragment shader 2731 may set acolor value to each of the pixels by using a texture 2732 that ispreviously stored. Thereafter, the pixel shader 2730 performspost-processing work on each of the pixels. The post-processing workincludes a blending work or an antialiasing work. Then, the pixel shader2730 transmits a result of the pixel processing to the frame buffer2740, and the frame buffer 2740 stores information transmitted from thepixel shader 2730.

An example of the operation of the vertex shader 2720 is described withreference to FIGS. 28 to 31.

FIG. 28 illustrates an example in which the vertex shader 2720 operatesaccording to an embodiment.

The vertex shader 2720 receives path data 2810 from the global memory2710. The vertex shader 2720 performs tile binning with respect to eachcommand included in the path data 2810 (2820). Tile binning signifies aprocess of setting the first winding number to each of the tilesincluded in the frame. In other words, as described above with referenceto FIGS. 6A to 13B, the vertex shader 2720 selects a tile through whichthe path passes from among the tiles included in the frame and sets thefirst winding number with respect to each of the tiles included in theframe. While the vertex shader 2720 performs tile binning, a tile bin2840 indicating generated information, for example, the first windingnumber and the position and direction of the path that passes throughthe tile, is stored in a local memory 2723.

An example in which the vertex shader 2720 performs tile binning isdescribed with reference to FIG. 29.

FIG. 29 illustrates an example in which the vertex shader 2720 performstile binning according to an embodiment.

The vertex shader 2720 acquires a command from the path data 2810(2910). The vertex shader 2720 searches for tiles to be passed by thecommand, among the tiles included in the frame (2920). In other words,the vertex shader 2720 selects tiles (hereinafter, referred to as thegrey tiles (2930), through which the path passes, among the tilesincluded in the frame. The vertex shader 2720 updates the information“Edge_List” of each of the grey tiles 2930 (2940). The information“Edge_List” of each of the grey tiles 2930 may be stored in the localmemory 2723 (2960).

The vertex shader 2720 sets the first winding number WN_(init) to eachof the tiles (hereinafter, referred to as the white tiles) located atone side of the grey tiles 2930 from among the tiles included in theframe (2950).

Then, the vertex shader 2720 determines whether a command that is notused for tile binning exists in the path data (2970). If a command thatis not used for tile binning exists, Operation 2910 is performed.Otherwise, Operation 2830 of FIG. 28 is performed.

Referring back to FIG. 28, the vertex shader 2720 acquires any one ofthe tiles included in the frame (2830), and calculates the windingnumber of each of the pixels included in the acquired tile (2850). Thevertex shader 2720 may calculate the winding number of a pixel by usinga tile bin 2840 stored in the local memory 2723.

Then, the vertex shader 2720 determines whether to perform shading of apixel based on a result of the calculation of the winding number. Forexample, the vertex shader 2720 may determine whether to performcoloring of a pixel based on the result of the calculation of thewinding number (2860).

Operations 2830 to 2860 illustrated in FIG. 28 are described in detailwith reference to FIG. 30.

FIG. 30 illustrates an example in which the vertex shader 2720calculates the winding numbers of the pixels and determines whether toperform shading of the pixels according to an embodiment.

The vertex shader 2720 acquires any one of the tiles included in theframe (3010), and determines whether the acquired tile is a white tile(3020). If the acquired tile is a white tile, Operation 3030 isperformed. Otherwise, Operation 3040 is performed.

If the acquired tile is a white tile, the vertex shader 2720 determinesthe set first winding number WN_(init) as the winding number WN of eachof the pixels included in the white tile (3030).

If the acquired tile is a gray tile, the vertex shader 2720 calculatesthe winding number of each of the pixels included in the gray tile. Thevertex shader 2720 may request the winding number generator 2750 tocalculate the winding numbers of the pixels. The winding numbergenerator 2750 may calculate the winding number of each of the pixelsincluded in the gray tile by using the information “Edge_List” stored inthe local memory 2723. An example in which the winding number generator2750 calculate the winding numbers of the pixels is the same as theexample described above with reference to FIGS. 16A to 16D.

The vertex shader 2720 determines whether to perform shading withrespect to each of the pixels based on a first rule (3060). The firstrule signifies a rule (non-zero rule) of assigning a color value to eachof the pixels having a winding number value that is not 0. When thevertex shader 2720 determines whether to set a color to a pixel based onthe first rule, Operation 3080 is performed. Otherwise, Operation 3070is performed.

The vertex shader 2720 determines whether the winding number of each ofthe pixels is not 0 (3080). For the pixel having the winding number thatis not 0, the vertex shader 2720 gives a command to the pixel shader2730 to perform shading on the pixel (3095).

The vertex shader 2720 determines whether to perform shading of each ofthe pixels based on a second rule (3070). The second rule signifies arule (even-odd rule) of assigning a color value to each of the pixelshaving a winding number value that is an odd number. When the vertexshader 2720 determines whether a color is set to a pixel based on thesecond rule, Operation 3090 is performed. Otherwise, the process isterminated.

As described above with reference to Operations 3060 and 3070, thevertex shader 2720 may assign a color value to each of the pixels basedon the first rule and the second rule, but the present embodiment is notlimited thereto. For example, the vertex shader 2720 may assign a colorvalue to each of the pixels based on an inverse non-zero rule of thefirst rule or an inverse even-odd rule of the second rule.

The vertex shader 2720 determines whether the winding number of each ofthe pixels is an odd number or an even number (3090). The odd numbersignifies that the absolute value of the winding number of a pixel is anodd number. For example, when the winding number is +3, the windingnumber is determined to be an odd number. When the winding number is −3,the winding number is also determined to be an odd number. For a pixelhaving a winding number that is an odd number, the vertex shader 2720instructs the pixel shader 2730 to perform shading of a pixel (3095).

Referring back to FIG. 28, before instructing the pixel shader 2730 toperform shading of a pixel, the vertex shader 2720 determines whether atile having pixels whose winding numbers are not calculated exists inthe tiles included in the frame (2870). If a tile having pixels whosewinding numbers are not calculated exists, Operation 2830 is performed.Otherwise, the vertex shader 2720 instructs the pixel shader 2730 toperform shading of a pixel.

FIG. 31 is a flowchart for explaining an example of a method ofcalculating the winding number of a pixel according to an embodiment.

Referring to FIG. 31, the method of calculating the winding number of apixel include operations that are time serially processed in the windingnumber generators 2600 and 2750 illustrated in FIGS. 26 and 27B.Accordingly, it may be seen that the descriptions on the winding numbergenerators 2600 and 2750 illustrated in FIGS. 26 and 27B, though theyare omitted in the following description, is applied to the method ofcalculating the winding number of a pixel described with reference toFIG. 31.

In Operation 3110, the winding number generators 2600 and 2750 receiveinformation, from the GPUs 2700 and 2701, about at least one of pathsand information about the first winding number set to each of the tilesincluded in the frame.

In Operation 3120, the winding number generators 2600 and 2750 calculatethe winding number corresponding to each of the pixels included in theframe by using the received information.

In Operation 3130, the winding number generators 2600 and 2750 outputthe calculated winding number to the GPUs 2700 and 2701.

On the other hand, the above-described method may also be implementedthrough computer readable code/instructions in/on a medium, e.g., acomputer readable medium, to control at least one processing element toimplement any above described embodiment. The medium can correspond toany medium/media permitting the storage and/or transmission of thecomputer readable code. The computer readable code can berecorded/transferred on a medium in a variety of ways, with examples ofthe medium including recording media, such as magnetic storage media(e.g., ROM, floppy disks, hard disks, etc.) and optical recording media(e.g., CD-ROMs, or DVDs).

According to the above descriptions with reference to FIGS. 1 to 31, therendering apparatus assigns the same winding number to all pixelsincluded in each of the tiles, through which a path does not pass, andcalculates the winding number only for each of the pixels included inthe tiles, through which a path passes, from among the pixels includedin the frame. Thus, the performance of the rendering apparatus may beimproved.

Also, path rendering may be performed without using a stencil buffer.Thus, the problems of excessive generation of memory input/output due toa use of the stencil buffer and generation of redundant memoryinput/output may be solved.

Also, since winding numbers with respect to each of the pixels includedin the frame are generated in parallel, path rendering may be performedat high speed and high resolution rendering may be achieved over a shortperiod of time.

It should be understood that the exemplary embodiments described hereinshould be considered in a descriptive sense only and not for purposes oflimitation. Descriptions of features or aspects within each embodimentshould typically be considered as available for other similar featuresor aspects in other embodiments.

While one or more embodiments of the present inventive concept have beendescribed with reference to the figures, it will be understood by thoseof ordinary skill in the art that various changes in form and detailsmay be made therein without departing from the spirit and scope of thepresent inventive concept as defined by the following claims.

1.-38. (canceled)
 39. An apparatus for rendering an object including apath, the apparatus comprising: memory storing computer-executableinstructions; one or more processors configured to execute thecomputer-executable instructions such that the one or more processorsare configured to, obtain path data including information about verticesincluded in the path and a command corresponding to the path, calculatein parallel a final winding number of each of tiles included in a framebased on the path data, determine, for each tile, whether to performshading based on the final winding number of the tile, and performshading on each of pixels included in the frame based on a result of thedetermining.
 40. The apparatus of claim 39, wherein the one or moreprocessors are further configured to execute the computer-executableinstructions such that the one or more processors are configured tocalculate the final winding number without rendering triangles includingthe object in a stencil buffer.
 41. The apparatus of claim 39, whereinthe one or more processors are further configured to execute thecomputer-executable instructions such that the one or more processorsare configured to: set a first winding number of each of the tilesincluded in the frame based on the path data; and calculate a secondwinding number of each of the tiles, through which the path passes, fromamong the tiles included in the frame based on the first winding number.42. The apparatus of claim 41, wherein the final winding number of eachof the tiles, through which the path does not pass, from among the tilesincluded in the frame, corresponds to the first winding number, and thefinal winding number of each of the tiles, through which the pathpasses, from among the tiles included in the frame, corresponds to thesecond winding number.
 43. The apparatus of claim 41, wherein the one ormore processors are further configured to execute thecomputer-executable instructions such that the one or more processorsare configured to: assign an initial winding number to each of the tilesincluded in the frame; select tiles, through which the path passes, fromamong the tiles included in the frame; and update the initial windingnumber of each of the tiles located at one side of the selected tilesaccording to a shape in which the path passes through the selectedtiles.
 44. The apparatus of claim 43, wherein the one side is determinedaccording to a position of each of the tiles included in the frame and aposition of the path in the frame.